# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header

DESCRIPTION="The goal of Bizgres is to to build a complete, database system for
business intelligence." 
HOMEPAGE="http://bizgres.org/"
SRC_URI="http://www.bizgres.org/assets/${P//./_}-SRC-tar.gz"
S=${WORKDIR}/${PN}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ~ppc"
IUSE="doc tcltk pam python perl java ssl nls libg++"

DEPEND=">=dev-db/postgresql-8.0.2
	sci-libs/proj
	>=sys-apps/sed-4"

src_unpack () {
	unpack ${A}
	cd ${WORKDIR}
	tar -xvf ${P//./_}-SRC-tar
}

src_compile() {
	source source-before-build.sh
	ant -Ddebug=false -DinstallRoot=/usr/bizgres compile || die "compile failed"
	ant -Ddebug=false -DinstallRoot=/usr/bizgres makeDoc || die
	ant -Ddebug=false -DinstallRoot=/usr/bizgres apidoc || die
}

src_install() {
	dodir /usr/bizgres
	source source-before-build.sh
	ant -Ddebug=false -DinstallRoot=${D}usr/bizgres install || die "install failed"
}
